<!--#INCLUDE FILE="config.asp"-->
<%
if(session("AdminId") = "" and Session("AdminAccessLevel") <> 1 ) then
	Response.Redirect("admin-login.asp?msg=invalid")
end if


 'Endcrypt information of CC
Set objEncrypter = Server.CreateObject ("Hyeongryeol.StringEncrypter")
objEncrypter.Key = edCode
objEncrypter.InitialVector = conIV
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link href="../styles.css" rel="stylesheet" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

<!-- DATE PICKER SCRIPT -->
<link type="text/css" href="../css/jquery-ui-1.8.21.custom.css" rel="stylesheet" />
<script type="text/javascript" src="../js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="../js/jquery-ui-1.8.21.custom.min.js"></script>

  <!-- END DATE PICKER SCRIPT -->
  
<script type="text/javascript"> 
	$(document).ready(function(){
		$('ul.guest_timeline_list li:nth-child(odd)').addClass('alternate');
		
		if ($('#addSales'))
		$('#addSales').click(function(){
			$.ajax({
				type:"POST",
				url: "add_SaleAgent.asp",
				dataType: "html",
				data: {result:$("#Resultados").val(), name:$("#Vendedor").val(), guestid:$("#guestID").val()},
				async: false,
				success: function(data){ 
					location.reload();
				}
			});
			return false;
		});
		
		if ($('#addNotes'))
		$('#addNotes').click(function(){
			$.ajax({
				type:"POST",
				url: "add_Notes.asp",
				dataType: "html",
				data: {title:$("#Titulo").val(), note:$("#Nota").val(), guestid:$("#guestID").val()},
				async: false,
				success: function(data){ 
					location.reload();
				}
			});
			return false;
		});
		
		$('.linkHistory').unbind();
		$('.linkHistory').click(function(ev) { 
			var buttonId = $(this).attr('id');
			var guestId = $("#guestID").val();
			window.open('HistoryDetail.asp?historyName='+buttonId+'&guestId='+guestId,
			'History Detail','width=200,height=400');
			ev.preventDefault();
			return false;
		});
	});
</script>


<title>Perfil de Huésped :: Costa Baja</title>

</head>
<body>
<%
	if(request("gId") <> "") then
		guestID = request("gId")
	else 
		guestID = 0
	end if
	
	sqlstring2 = "SELECT TOP 1 CreditcardID, TransportID FROM Guests WHERE Guests.GuestID ="& guestID
	
	set objConnect1 = server.createObject("ADODB.Connection")   

	objConnect1.Open conStr

	set TblTemp1 = server.createobject("Adodb.Recordset")
		
		TblTemp1.Open sqlstring2, objConnect1
		
	If not TblTemp1.EOF Then
		CreditcardID = TblTemp1("CreditcardID")
		TransportID = TblTemp1("TransportID")
	end if 
	
	
	dim count
	
	dim travelsAreals, strItem
	SET travelsAreals = CreateObject("Scripting.Dictionary")
	count = 0
	
	sqlstring = ""
	sqlstring = sqlstring & "SELECT Guests.*, Travels.*, Transports.*, Codes.* "
	sqlstring = sqlstring & "FROM Guests "
	sqlstring = sqlstring & "INNER JOIN Guests_Travels on Guests.GuestID = Guests_Travels.GuestID "
	sqlstring = sqlstring & "INNER JOIN Travels on Guests_Travels.TravelID = Travels.TravelID "
	sqlstring = sqlstring & "INNER JOIN Codes on Travels.CodeID = Codes.CodeID "
	sqlstring = sqlstring & "INNER JOIN Transports on Guests.TransportID = Transports.TransportID "
	sqlstring = sqlstring & "WHERE Guests.GuestID ="& guestID
	
	sqlstring1 = ""
	sqlstring1 = sqlstring1 & "SELECT Guests.*, Travels.*, Transports.*, Codes.*, Creditcards.* "
	sqlstring1 = sqlstring1 & "FROM Guests "
	sqlstring1 = sqlstring1 & "INNER JOIN Guests_Travels on Guests.GuestID = Guests_Travels.GuestID "
	sqlstring1 = sqlstring1 & "INNER JOIN Travels on Guests_Travels.TravelID = Travels.TravelID "
	sqlstring1 = sqlstring1 & "INNER JOIN Codes on Travels.CodeID = Codes.CodeID "
	sqlstring1 = sqlstring1 & "INNER JOIN Transports on Guests.TransportID = Transports.TransportID "
	sqlstring1 = sqlstring1 & "INNER JOIN Creditcards on Guests.CreditcardID = Creditcards.CreditcardID "
	sqlstring1 = sqlstring1 & "WHERE Guests.GuestID ="& guestID
	
	sqlstring2 = ""
	sqlstring2 = sqlstring2 & "SELECT Guests.*, Travels.*, Codes.* "
	sqlstring2 = sqlstring2 & "FROM Guests "
	sqlstring2 = sqlstring2 & "INNER JOIN Guests_Travels on Guests.GuestID = Guests_Travels.GuestID "
	sqlstring2 = sqlstring2 & "INNER JOIN Travels on Guests_Travels.TravelID = Travels.TravelID "
	sqlstring2 = sqlstring2 & "INNER JOIN Codes on Travels.CodeID = Codes.CodeID "
	sqlstring2 = sqlstring2 & "WHERE Guests.GuestID ="& guestID
	
	sqlstring3 = ""
	sqlstring3 = sqlstring3 & "SELECT Guests.*, Travels.*, Codes.*, Creditcards.* "
	sqlstring3 = sqlstring3 & "FROM Guests "
	sqlstring3 = sqlstring3 & "INNER JOIN Guests_Travels on Guests.GuestID = Guests_Travels.GuestID "
	sqlstring3 = sqlstring3 & "INNER JOIN Travels on Guests_Travels.TravelID = Travels.TravelID "
	sqlstring3 = sqlstring3 & "INNER JOIN Codes on Travels.CodeID = Codes.CodeID "
	sqlstring3 = sqlstring3 & "INNER JOIN Creditcards on Guests.CreditcardID = Creditcards.CreditcardID "
	sqlstring3 = sqlstring3 & "WHERE Guests.GuestID ="& guestID
	
	set objConnect = server.createObject("ADODB.Connection")   

	objConnect.Open conStr

	set TblTemp = server.createobject("Adodb.Recordset")
		
	if (IsNull(CreditcardID) AND IsNull(TransportID) = False) then
		TblTemp.Open Sqlstring, objConnect
	end if
	if (IsNull(TransportID) AND IsNull(CreditcardID) = False) then
		TblTemp.Open sqlstring3, objConnect
	end if
	if (IsNull(TransportID) AND IsNull(CreditcardID)) then
		TblTemp.Open sqlstring2, objConnect
	end if
	if (IsNull(TransportID) = False AND IsNull(CreditcardID) = False) then
		TblTemp.Open sqlstring1, objConnect
	end if
		
		Do Until TblTemp.EOF
		count = count + 1
			Name = TblTemp("Name")
			Middle = TblTemp("Middle")
			Surname = TblTemp("Surname")
			Phone = TblTemp("Phone")
			Email = TblTemp("Email")
			LanguageID = TblTemp("LanguageID")
			Address1 = TblTemp("Address1")
			Address2 = TblTemp("Address2")
			City = TblTemp("City")
			Province = TblTemp("Province")
			ZipCode = TblTemp("Zip")
			Country = TblTemp("Country")
			Communication = TblTemp("Communication")
			CreditcardID = TblTemp("CreditcardID")
			TransportID = TblTemp("TransportID")
			
			Code = TblTemp("Code")
			ArrivalDate1 = TblTemp("ArrivalDate1")
			DepartureDate1 = TblTemp("DepartureDate1")
			ArrivalDate2 = TblTemp("ArrivalDate2")
			DepartureDate2 = TblTemp("DepartureDate2")
			TotalNumberGuests = TblTemp("TotalNumberGuests")
			NumberChildren = TblTemp("NumberChildren")
			NamesChaperone = TblTemp("NamesChaperone")
			ExtraNight = TblTemp("ExtraNight")
			RoomDetail = TblTemp("RoomDetail")
			ActivitesOnTravels = TblTemp("ActivitesOnTravels")
			Campaign = TblTemp("Campaign")
			Originator = TblTemp("Originator")
			ProductID = TblTemp("ProductID")
			PropertyID = TblTemp("PropertyID")
			Travelid = TblTemp("TravelID")
			PendingTasksId = TblTemp("PendingTasksId")
			
			// Add to dictionary
			travelsAreals.Add ""&count, Array(Originator,ProductID,Campaign,ArrivalDate1, DepartureDate1, ArrivalDate2, DepartureDate2,TotalNumberGuests,NumberChildren,ExtraNight,NamesChaperone,RoomDetail,ActivitesOnTravels,Travelid)
			
			if (IsNull(TransportID) = False) then
				ArrivalAirlineID = TblTemp("ArrivalAirlineID")
				ArrivalAirportID = TblTemp("ArrivalAirportID")
				ArrivalNeedTransport = TblTemp("ArrivalNeedTransport")
				ApproximateArrivalTime = TblTemp("ApproximateArrivalTime")
				DepartureAirlineID = TblTemp("DepartureAirlineID")
				DepartureAirportID = TblTemp("DepartureAirportID")
				DepartureNeedTransport = TblTemp("DepartureNeedTransport")
				DepartureTime = TblTemp("DepartureTime")
				Note = TblTemp("Notes")
				InformationPending = TblTemp("InformationPending")
			end if
			
			if (IsNull(CreditcardID) = False) then
				nameCard = objEncrypter.Decrypt(TblTemp("NameCard"))
				typeCard = objEncrypter.Decrypt(TblTemp("TypeCard"))
				cardNumber = objEncrypter.Decrypt(TblTemp("CardNumber"))
				expDate = TblTemp("ExpDate")
				securityCode = objEncrypter.Decrypt(TblTemp("SecurityCode"))
			end if

		TblTemp.MoveNext
	Loop
%>
<div id="main_wrapper">
    	<div class="main_wrapper_margin">
        	
            <div class="admin_top_menu">
            <!--#INCLUDE FILE="admin_menu.asp"--> 
           	</div>
        
    		<h1>Huésped: <%=Name%> <%=Surname%></h1>
			<%if (PendingTasksId = 3) then%>
			<h3><a href="Final_Email.asp?guesid=<%=guestID%>">Final Email</a></h3>
			<%end if%>
         	<div class="clear"></div>
            <hr/>
           
           <div class="todo_column">
        <p><strong>Estado de Huésped: </strong>Nuevo Perfil</p>
  
 <form action="update-profile-guests-process.asp" method="get" id="updateInformation">
           <fieldset>
           	<legend>Informacion Personal</legend>
            <table cellpadding="0" width="100%">
            	<input type="hidden" id="guestID" name="guestID" value="<%=guestID%>" />
                <tr> <!-- ROW -->
                	<td width="33%">
            		<label>Nombre: </label><br />
					<input type="text" value="<%=Name%>" name="name" id="name" />
  					</td>
                    <td width="33%">
                    <label>Segundo Nombre: </label><br />
                    <input type="text" value="<%=Middle%>" name="mName" id="mName" />
            		</td>
                    <td width="33%">
                    <label>Apellido: </label><br />
					<input type="text" value="<%=Surname%>" name="sName" id="sName" />
                    </td>
                </tr><!-- END ROW -->
                
                 <tr> <!-- ROW -->
                	<td width="33%">
            		<label>Telefono: </label><br />
					<input type="text" value="<%=Phone%>" name="phone" id="phone" />
  					</td>
                    <td width="33%">
                    <label>E-mail: </label><br />
					<input type="text" value="<%=Email%>" name="email" id="email"/>
            		</td>
                    <td width="33%">
                    		<label>Idioma: </label><br />
            			<select  id="Idioma" name="Idioma">
	            		<option value="0" <% if(LanguageID=0) then%> selected="selected"<% end if%>>-- Seleccionar --</option>
            			<option value="1" <% if(LanguageID=1) then%> selected="selected"<% end if%>>Español</option>
                		<option value="2" <% if(LanguageID=2) then%> selected="selected"<% end if%>>English</option>
            			</select>
                    
                    </td>
                </tr><!-- END ROW -->
                
                  <tr> <!-- ROW -->
                    <td>
            	<label>Direccion 1: </label><br />
                <input type="text" value="<%=Address1%>" name="address1" id="address1" />
            		</td>
                    <td>
            	<label>Direccion 2: </label><br />
                <input type="text" value="<%=Address2%>" name="address2" id="address2" />
            		</td>
                    <td>
             <label>Ciudad: </label><br />
                <input type="text" name="Ciudad" id="Ciudad" value="<%=City%>"/>
            		</td>
                 </tr><!-- END ROW -->
                
               <tr> <!-- ROW -->
                    <td>
            	<label>Stado / Provincia: </label><br />
                <input type="text" name="Stado" id="Stado" value="<%=Province%>"/>
            		</td>
                    <td>
            	<label>Codigo Postal: </label><br />
                <input type="text" name="Postal" id="Postal" value="<%=ZipCode%>"/>
            		</td>
                    <td>
             <label>Pais: </label><br />
                <input type="text" name="Pais" id="Pais" value="<%=Country%>"/>
            		</td>
                 </tr><!-- END ROW -->
                    
                <tr> <!-- ROW -->
                    <td>
                  		<label>Comunicasion: </label><br />
            			<select name = "Comunicasion" id="Comunicasion">
            			<option value="0">-- Seleccionar --</option>
            			<option <% if(Communication = "Telefono") then%> selected="selected" <% end if%> value="Telefono">Telefono</option>
                		<option <% if(Communication = "E-Mail") then%> selected="selected" <% end if%> value="E-Mail">E-Mail</option>
            			</select>
            		</td>
                    <td>
	<label>Propiedad: </label><br />
            			<select disabled>
			    		<option value="0">-- Seleccionar --</option>
            			<option <% if(PropertyID=1) then%> selected="selected"<% end if%>>VM - Vista Mar</option>
                		<option <% if(PropertyID=2) then%> selected="selected"<% end if%>>LC Las Colinas Resort</option>
            			</select>
            		</td>
                    <td>
             		<label>Ingresar CODIGO: </label><br />
					<input type="text" id="code" name="code" value="<%=Code%>" disabled />
                    </td>
                 </tr><!-- END ROW -->
           
            </table>
            
           </fieldset>
           
           
           <fieldset><!-- TRANSPORTACION -->
           		<legend>Tarjeta de Credito</legend>
                
           <table cellpadding="0" width="100%">  
              <tr> <!-- ROW -->
                	<td width="33%">
            		<label>Nombre: </label><br />
					<input type="text" name="NombreCredit" id="NombreCredit" value="<%=nameCard%>" />   </td>
                    <td width="33%">
                             <label>Tipo: </label><br />
					<select name="Tipo" id="Tipo">
	            		<option value="">-- Seleccionar --</option>
            			<option value="Visa" <% if(typeCard = "Visa") then%> selected="selected" <% end if%>>Visa</option>
                		<option value="Master Card" <% if(typeCard = "Master Card") then%> selected="selected" <% end if%>>Master Card</option>
                        <option value="American Express" <% if(typeCard = "American Express") then%> selected="selected" <% end if%>>American Express</option>
                        <option value="Discover" <% if(typeCard = "Discover") then%> selected="selected" <% end if%>>Discover</option>
                       </select>
                    </td>
                    
                 <td width="33%">
                             <label>Numero de Tarjeta: </label><br />
				<input type="text" name="NumeroDeTarjeta" id="NumeroDeTarjeta" value="<%=cardNumber%>" />
                    </td>
                    
                    </tr>
           
              
           <tr> <!-- ROW -->
                  <td width="33%">
                    <label>Fecha de Expiracion (mm/dd/yyyy)</label><br />
					<%If(expDate = "") then  %>
	            	<input type="text" name="FechaDeExpiracion" id="FechaDeExpiracion" value="" />
					<%else%> 
					<input type="text" name="FechaDeExpiracion" id="FechaDeExpiracion" value="<%=FormatDateTime(expDate,2)%>" />
					<%end if%>
            		</td>
                    
                    <td>
                      <label>Codigo de Seguridad: </label><br />
				<input type="text" name="CodigoDeSeguridad" id="CodigoDeSeguridad" value="<%=securityCode%>" /> 
                    </td>
                    
                </tr><!-- END ROW --> 
           
           </table>
           </fieldset><!-- END TRANSPORTACION -->
           

<!-- SECOND PART OF THE FORM -->           
           <fieldset>
<%dim number
For Each strItem In travelsAreals
number = number + 1
%>  
			<%if (number > 1) then%>
             </tr><td colspan="4"><hr></td></tr>
			 
			<%end if%>
           		<legend>Informacion de Viaje <%=number%></legend>
                  <table cellpadding="0" width="100%">
                  <input type="hidden" id="travelID_<%=number%>" name="travelID_<%=number%>" value="<%=travelsAreals(strItem)("13")%>" />
                    <tr> <!-- ROW -->
                	<td width="33%">
            		<label>Originador :</label><br />
                    <input type="text" disabled name="Originador_<%=number%>" id="Originador_<%=number%>" value="<%=travelsAreals(strItem)("0")%>"/>
  					</td>
                    <td width="33%">
                    <label>Producto :</label><br />
                     	<select disabled>
			    		<option value="">-- Seleccionar --</option>
            			<option <% if(travelsAreals(strItem)("1")= 1) then%> selected="selected" <% end if%> value="Residencia">Residencia</option>
                		<option <% if(travelsAreals(strItem)("1")= 2) then%> selected="selected" <% end if%> value="Full/Ownership">Full/Ownership</option>
            			</select>
            			</select>
            		</td>
                    <td width="33%">
                    <label>Campaña :</label><br />
					<input type="text" disabled name="Campaña_<%=number%>" id="Campaña_<%=number%>" value="<%=travelsAreals(strItem)("2")%>"/>
                    </td>
                </tr><!-- END ROW -->
           
                  
                     <tr> <!-- ROW -->
                	<td width="33%">
            		<label>Fecha 1</label>
  					</td>
                    <td width="33%">
                    <label>Llegada: </label><br />
                    <input type="text" id="arrival1_<%=number%>" name="arrival1_<%=number%>" value="<%=travelsAreals(strItem)("3")%>"/>
            		</td>
                    <td width="33%">
                    <label>Salida: </label><br />
					<input type="text" id="departure1_<%=number%>" name ="departure1_<%=number%>" value="<%=travelsAreals(strItem)("4")%>"/>
                    </td>
                </tr><!-- END ROW -->
                
        
                     <tr> <!-- ROW -->
                	<td width="33%">
            		<label>Fecha 2</label>
  					</td>
                    <td width="33%">
                    <label>Llegada: </label><br />
                    <input type="text"  id="arrival2_<%=number%>" name="arrival2_<%=number%>" value="<%=travelsAreals(strItem)("5")%>"/>
            		</td>
                    <td width="33%">
                    <label>Salida: </label><br />
					<input type="text" id="departure2_<%=number%>" name ="departure2_<%=number%>" value="<%=travelsAreals(strItem)("6")%>"/>
                    </td>
                </tr><!-- END ROW -->
            
                <tr> <!-- ROW -->
                	<td width="33%">
            		<label>Numero Total de Invitados: </label><br />
                    <select name="NumeroTotaldeInvitados_<%=number%>" id="NumeroTotaldeInvitados_<%=number%>">
                    <%For i = 0 To 5 %>
                    <option value="<%=i%>" <% if(travelsAreals(strItem)("7")= i) then%> selected="selected" <% end if%>><%=i%></option>
					<%Next%>                
                    </select>
  					</td>
                    <td width="33%">
                    <label>Numero de Niños: </label><br />
                    <select name="NumerodeNinos_<%=number%>" id="NumerodeNinos_<%=number%>">
                    <%For i = 0 To 10 %>
                    <option value="<%=i%>" <% if(travelsAreals(strItem)("8") = i) then%> selected="selected" <% end if%>><%=i%></option>
					<%Next%>                
                    </select>
                    </td>
                    <td width="33%">
                    <label>Noches Extras: </label><br />
					<select name="NochesExtras_<%=number%>" id="NochesExtras_<%=number%>">
                    <%For i = 0 To 5 %>
                    <option value="<%=i%>" <% if(travelsAreals(strItem)("9")= i) then%> selected="selected" <% end if%>><%=i%></option>
					<%Next%>   
                    </select>
                    </td>
                </tr><!-- END ROW -->
                
                 <tr> <!-- ROW -->
                	<td width="33%">
            		<label>Nombres de Acompañantes: </label><br />
					<textarea cols="15" rows="5" name="NombresdeAcompanantes_<%=number%>" id="NombresdeAcompanantes_<%=number%>"><%=travelsAreals(strItem)("10")%></textarea>
  					</td>
                    <td width="33%">
                    <label>Detalles de Habitacion: </label><br />
					<textarea cols="15" rows="5" name="DetallesdeHabitacion_<%=number%>" id="DetallesdeHabitacion_<%=number%>"><%=travelsAreals(strItem)("11")%></textarea>
            		</td>
                    <td width="33%">
                    
                            <label>Actividades: </label><br />
					<textarea cols="15" rows="5" name="Actividades_<%=number%>" id="Actividades_<%=number%>"><%=travelsAreals(strItem)("12")%></textarea>
              
                    </td>
                </tr><!-- END ROW -->
            </table>
	  <%Next%>    			                
           </fieldset><!-- END OF FADED -->
           
            <fieldset><!-- TRANSPORTACION -->
           		<legend>Transporte</legend>
                
           <table cellpadding="0" width="100%">     
           <tr> <!-- ROW -->
                	<td width="33%">
            		<label>Aereolinea: </label><br />
					<select name="Aereolinea" id="Aereolinea">
	            		<option value="0">-- Seleccionar --</option>
            			<option value="1" <% if(ArrivalAirlineID= 1) then%> selected="selected" <% end if%>>American Airlines</option>
                		<option value="2" <% if(ArrivalAirlineID= 2) then%> selected="selected" <% end if%>>United</option>
                        <option value="3" <% if(ArrivalAirlineID= 3) then%> selected="selected" <% end if%>>AereoMexico</option>
                        <option value="4" <% if(ArrivalAirlineID= 4) then%> selected="selected" <% end if%>>LAN</option>
                       </select>
                       </td>
                    <td width="33%">
                             <label>Aereopuerto: </label><br />
					<select name="Aereopuerto" id="Aereopuerto">
	            		<option value="0">-- Seleccionar --</option>
            			<option value="1" <% if(ArrivalAirportID= 1) then%> selected="selected" <% end if%>>La Paz</option>
                		<option value="2" <% if(ArrivalAirportID= 2) then%> selected="selected" <% end if%>>Los Cabos</option>
            		</select>
                    </td>
                    
                   <td width="33%">
                    <label>Necesitan Transporte? </label><br />
					<select name="NecesitanTransporte" id="NecesitanTransporte">
	            		<option value="-1">-- Seleccionar --</option>
            			<option value="1" <% if(ArrivalNeedTransport = "True") then%> selected="selected" <% end if%>>SI</option>
                		<option value="0" <% if(ArrivalNeedTransport = "False") then%> selected="selected" <% end if%>>NO</option>
            		</select>
            		</td>
                </tr><!-- END ROW --> 
                
                 <tr> <!-- ROW -->
                	<td width="33%">
            		<label>Hora Aproximada de llegada: </label><br />
					<input type="text" name="Horadellegada" id="Horadellegada" value=<%=ApproximateArrivalTime%> />
                    
                    
                       </td>
                    <td width="33%">&nbsp;
                  
                    </td>
                    
                   <td width="33%">&nbsp;
                 
            		</td>
                </tr><!-- END ROW --> 
                
                 <tr><!-- ROW -->
                <td colspan="3">
                <label>Notas: </label><br /> 
                <textarea cols="50" rows="3" name="Notas" id="Notas"><%=Note%></textarea>
                </td>
                </tr><!-- END ROW -->
                
                <tr><!-- ROW -->
                <td colspan="3">
                <label>Inforamacion Pendiente: </label><br />
                <textarea cols="50" rows="3" name="InforamacionPendiente" id="InforamacionPendiente"><%=InformationPending%></textarea>
                </td>
                </tr><!-- END ROW -->
                
                
                  <tr> <!-- ROW -->
                	
                    <td valign="bottom" align="center" colspan="3">
                    <br />
                    <input type="submit"  value="Enviar"/>
            		</td>
                    <td width="33%">&nbsp;
                    
                    </td>
                </tr><!-- END ROW -->
           
           </table>
           </fieldset><!-- END TRANSPORTACION -->
           </form>
           
            
  		
           
          	</div><!-- END .todo_column -->
			
            <div class="timeline_column">
            <div class="profile_top_right">
 			<h2>Historia de Huesped</h2>
            <ul class="guest_timeline_list">
    <%
		sqlstring4 = "SELECT * FROM Historys WHERE Historys.GuestID ="& guestID
		set objConnect4 = server.createObject("ADODB.Connection")   

		objConnect4.Open conStr

		set TblTemp4 = server.createobject("Adodb.Recordset")
			
			TblTemp4.Open sqlstring4, objConnect4
			
		Do Until TblTemp4.EOF
			NameOfHistory = TblTemp4("Name")
			DateOfHistory = TblTemp4("Date")
	%>
			<%if (IsNull(DateOfHistory) = False)%>	
            	<li><a href="#" id="<%=NameOfHistory%>" class="linkHistory"><%=NameOfHistory%></a> <span><%=DateOfHistory%></span></li>
			<%end if%>
     <%
	TblTemp4.MoveNext
	Loop

%>               
            </ul>
            
            
            </div><!-- profile_top_right -->
            
            <div class="profile_bottom_right">
            
            <form action="addnewAgent" method="get">
            <label>Resultados:</label><br />
            <input type="text" name="Resultados" id="Resultados"/><br />
            <label>Vendedor:</label><br />
            <input type="text" id="Vendedor" name="Vendedor"/><br />
			<input type="hidden" id="guestID" name="guestID" value="<%=guestID%>" />
            <input type="button"  value="Enviar" id="addSales"/>        
            </form>
            
            </div><!-- .profile_bottom_right -->
			
			<div class="profile_bottom_right">
            <h2>Ingresar Nota Nueva</h2>
            <form action="addnewNotes" method="get">
            <label>Titulo:</label><br />
            <input type="text" id="Titulo" name="Titulo"/><br />
            <label>Nota:</label><br />
            <textarea cols="18" rows="5" id="Nota" name="Nota"></textarea><br />
			<input type="hidden" id="guestID" name="guestID" value="<%=guestID%>" />
            <input type="button"  value="Enviar" id="addNotes"/>        
            </form>
            
            </div><!-- .profile_bottom_right -->
            
            </div> <!-- END .timeline_column -->
            
            <div class="clear"></div>    
    
    
    
    	</div><!-- END .main_wrapper_margin -->
	</div><!-- END #main_wrapper -->

         <!-- FOOTER -->
         
         <!--#INCLUDE file="admin_footer.asp"-->
         
         <!-- END FOOTER -->   
<script type="text/javascript">
	$(function() {
		if($("#arrival1_1"))
			$( "#arrival1_1" ).datepicker();
		if($("#departure1_1"))
			$( "#departure1" ).datepicker();
		if($("#arrival2_1"))
			$( "#arrival2_1" ).datepicker();
		if($("#departure2_1"))
			$( "#departure2_1" ).datepicker();
			
		if($("#arrival1_2"))
			$( "#arrival1_2" ).datepicker();
		if($("#departure1_2"))
			$( "#departure1_2" ).datepicker();
		if($("#arrival2_2"))
			$( "#arrival2_2" ).datepicker();
		if($("#departure2_2"))
			$( "#departure2_2" ).datepicker();
			
		if($("#arrival1_3"))
			$( "#arrival1_3" ).datepicker();
		if($("#departure1_3"))
			$( "#departure1_3" ).datepicker();
		if($("#arrival2_3"))
			$( "#arrival2_3" ).datepicker();
		if($("#departure2_3"))
			$( "#departure2_3" ).datepicker();
	});
	</script>
</body>
</html>
